<%@ page language="java" import="java.util.*,dtt.*" pageEncoding="ISO-8859-1"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%
  UserBean userbean1 = (UserBean) session.getAttribute("userbean");
  System.out.println("username "+userbean1.getUserId()+" role "+userbean1.getUserRole());
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>Projects LeftMenu</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	
	<link rel="stylesheet" type="text/css" href="styles.css">
	

  </head>
  
  <body>
    		Name:<%=userbean1.getUserName()%>
    		<br>
    		Role:<%=userbean1.getUserRole() %>
    		<br>
    		Logged on at <%=(new Date().toString())%>
    		<br>
    		
    		<table width="140" border="0" cellpadding="2" cellspacing="2">
    		<%--
 			Menu item ADD PROJECTS for Admin
 			--%><%if (userbean1.getUserRole().equals(Constants.ROLE_ADMIN)){ %>
    		<tr>
    		<TD class="LeftButton"> <a class="LeftButton" href="servlet/FrontController?DTT_ACTION=ADD_PRJ_FORM"> Add Projects </a></TD>
    		</tr>
    		<tr>
    		<TD>  </TD>
    		</tr>
    		<% } %>

<%--
 Menu item ADD Team members for Admin
 --%>
 			<%if (userbean1.getUserRole().equals(Constants.ROLE_ADMIN)){ %>
    		<tr>
    		<TD class="LeftButton"> <a class="LeftButton" href="servlet/FrontController?DTT_ACTION=ADD_TEAMMEMBER_FORM"> Add TeamMembers </a></TD>
    		</tr>
    		<tr>
    		<TD>  </TD>
    		</tr>
    		<% } %>

 <%--
 Menu item assign Team members to project for Admin & Manager
 --%>
 			<%if (userbean1.getUserRole().equals(Constants.ROLE_ADMIN)){ %>
    		<tr>
    		<TD class="LeftButton"> <a class="LeftButton" href="servlet/FrontController?DTT_ACTION=MANAGER_FORM"> Manage TeamMembers & Project & Role </a></TD>
    		</tr>
    		<tr>
    		<TD>  </TD>
    		</tr>
    		<% } %>

    		<tr> 
    		<TD class="LeftButton1"> <a class="LeftButton1" href="servlet/FrontController?DTT_ACTION=PROFILE_FORM">Profile</a></TD>
    		</tr>	
    		<tr> 
    		<TD class="LeftButton1"> <a class="LeftButton1" href="servlet/FrontController?DTT_ACTION=SEARCH_DEFECT_FORM"> Search </a></TD>
    		</tr>	

  			<tr>
    		<TD class="LeftButton1"> <a class="LeftButton1" href="servlet/FrontController?DTT_ACTION=LOGOUT"> Logout </a></TD>
    		</tr>     
	
    		</table>
  </body>
</html>
